home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Found / FWCommon / Include / FWMath.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-21  |  632 b   |  26 lines  |  [TEXT/MPS ]

  1. #ifndef FWMATH_H
  2. #define FWMATH_H
  3. //========================================================================================
  4. //
  5. //    File:                FWMath.h
  6. //    Release Version:    $ 1.0d1 $
  7. //
  8. //    Creation Date:        3/25/94
  9. //
  10. //    Copyright:    © 1994 by Apple Computer, Inc., all rights reserved.
  11. //
  12. //========================================================================================
  13.  
  14.     
  15.     template<class tType>
  16.     tType FW_Minimum(tType a, tType b) { return a<b ? a : b; }
  17.     
  18.     template<class tType>
  19.     tType FW_Maximum(tType a, tType b) { return a>b ? a : b; }
  20.     
  21.     template<class tType>
  22.     tType FW_Absolute(tType a) { return a<0 ? -a : a; }
  23.     
  24.  
  25. #endif
  26.